package P1_2;
public class T01 {
    public static void main(String[] args) {
        Student s=new Student(new MyDate(1998,3,5),"张三");
        s.testSay();
    }
}
class Person {
    private String name;
    private MyDate birthday;
    public Person(MyDate birthday,String name){
        this.birthday=birthday;
        this.name=name;
    }
    public void say(){
        System.out.println("嘿嘿");
    }
}
class Student extends Person{

    public Student(MyDate birthday, String name) {
        super(birthday, name);
    }
    public void say(){
        System.out.println("哈哈");
    }
    public void testSay(){
        super.say();
    }
}
class MyDate{
    public int getY() {
        return y;
    }

    public void setY(int y) {
        this.y = y;
    }

    public int getM() {
        return m;
    }

    public void setM(int m) {
        this.m = m;
    }

    public int getD() {
        return d;
    }

    public void setD(int d) {
        this.d = d;
    }

    private int y,m,d;

    MyDate(int y, int m, int d) {
        this.y = y;
        this.m = m;
        this.d = d;
    }
}